package com.ruoyi.project.lely.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 搜索历史
 *
 * @author luoyong
 */
@Data
@ApiModel("搜索历史 入参DTO")
public class LySearchHistoryDTO {

    @ApiModelProperty("ID")
    private Long id;

    @NotNull
    @ApiModelProperty("用户表的用户ID")
    private Integer userId;

    @Length(max = 63, message = "搜索关键字长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("搜索关键字")
    private String keyword;

    @Length(max = 63, message = "搜索来源，如pc、wx、app长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("搜索来源，如pc、wx、app")
    private String from;

}
